Telegram Group & Telegram Channel
Вы используете локальные переменные в LINQ и используете let? 👇

Ключевое слово let позволяет вводить временную переменную прямо внутри запроса LINQ — как локальную переменную в цикле.

Разбивайте сложные вычисления на части

Делайте запрос модульнее и чище

Меньше проходов по данным → выше производительность

👉 Простой пример:
csharp


from order in orders
let total = order.Items.Sum(i => i.Price * i.Quantity)
where total > 1000
let categories = order.Items.Select(i => i.Category).Distinct()
select new
{
OrderId = order.Id,
Total = total,
Categories = categories
};

let total = … — вычисляем сумму заказа только один раз

where total > 1000 — фильтруем по готовому значению

let categories = … — собираем уникальные категории



tg-me.com/csharp_1001_notes/675
Create:
Last Update:

Вы используете локальные переменные в LINQ и используете let? 👇

Ключевое слово let позволяет вводить временную переменную прямо внутри запроса LINQ — как локальную переменную в цикле.

Разбивайте сложные вычисления на части

Делайте запрос модульнее и чище

Меньше проходов по данным → выше производительность

👉 Простой пример:
csharp


from order in orders
let total = order.Items.Sum(i => i.Price * i.Quantity)
where total > 1000
let categories = order.Items.Select(i => i.Category).Distinct()
select new
{
OrderId = order.Id,
Total = total,
Categories = categories
};

let total = … — вычисляем сумму заказа только один раз

where total > 1000 — фильтруем по готовому значению

let categories = … — собираем уникальные категории

BY C# 1001 notes




Share with your friend now:
tg-me.com/csharp_1001_notes/675

View MORE
Open in Telegram


C 1001 notes Telegram | DID YOU KNOW?

Date: |

Export WhatsApp stickers to Telegram on iPhone

You can’t. What you can do, though, is use WhatsApp’s and Telegram’s web platforms to transfer stickers. It’s easy, but might take a while.Open WhatsApp in your browser, find a sticker you like in a chat, and right-click on it to save it as an image. The file won’t be a picture, though—it’s a webpage and will have a .webp extension. Don’t be scared, this is the way. Repeat this step to save as many stickers as you want.Then, open Telegram in your browser and go into your Saved messages chat. Just as you’d share a file with a friend, click the Share file button on the bottom left of the chat window (it looks like a dog-eared paper), and select the .webp files you downloaded. Click Open and you’ll see your stickers in your Saved messages chat. This is now your sticker depository. To use them, forward them as you would a message from one chat to the other: by clicking or long-pressing on the sticker, and then choosing Forward.

China’s stock markets are some of the largest in the world, with total market capitalization reaching RMB 79 trillion (US$12.2 trillion) in 2020. China’s stock markets are seen as a crucial tool for driving economic growth, in particular for financing the country’s rapidly growing high-tech sectors.Although traditionally closed off to overseas investors, China’s financial markets have gradually been loosening restrictions over the past couple of decades. At the same time, reforms have sought to make it easier for Chinese companies to list on onshore stock exchanges, and new programs have been launched in attempts to lure some of China’s most coveted overseas-listed companies back to the country.

C 1001 notes from in


Telegram C# 1001 notes
FROM USA